home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Sample
- Caption = "Sample"
- ClientHeight = 2868
- ClientLeft = 48
- ClientTop = 276
- ClientWidth = 3900
- LinkTopic = "Form1"
- ScaleHeight = 2868
- ScaleWidth = 3900
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command2
- Caption = "Object Errors"
- Height = 468
- Left = 1536
- TabIndex = 2
- Top = 2328
- Width = 1404
- End
- Begin VB.TextBox Text1
- BackColor = &H8000000F&
- Height = 2100
- Left = 216
- Locked = -1 'True
- MultiLine = -1 'True
- TabIndex = 1
- Text = "Sample.frx":0000
- Top = 168
- Width = 3612
- End
- Begin VB.CommandButton Command1
- Caption = "Div by 0"
- Height = 468
- Left = 216
- TabIndex = 0
- Top = 2328
- Width = 1092
- End
- Attribute VB_Name = "Sample"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Command1_Click()
- Dim a As Double, b As Double, c As Double
- a = 18
- ' Division by 0 error!! (I forgot to initialize b :)) )
- c = a / b
- MsgBox "C=" & c
- End Sub
- Private Sub Command2_Click()
- Dim obj As Object
- ' Some object errors...
- Set obj = CreateObject("ThisObject.DoesNotExist")
- obj.UnknownProperty = "Hello"
- End Sub
-